This section describes the callback routines you can define if you want your application to be automatically informed whenever an error, warning, or notice occurs during the execution of QuickDraw 3D routines.
You can define an error-handling function to handle errors that occur during the execution of QuickDraw 3D routines.
typedef void (*TQ3ErrorMethod) (
TQ3Error firstError,
TQ3Error lastError,
long reference);
Your TQ3ErrorMethod function is called whenever a QuickDraw 3D routine generates an error (fatal or otherwise) during its execution that QuickDraw 3D cannot handle internally. Your error-handling function should handle the error conditions indicated by the firstError and lastError parameters. If necessary, you can long jump out of your error method.
Your function must not call any QuickDraw 3D routines other than Q3Error_IsFatalError (which you can call to determine if the error was fatal). The reference parameter contains the long integer that you passed to Q3Error_Register when you registered your error handler. You can, for example, use that long integer to point to any data required by your error handler.
You can define a function to handle warnings that occur during the execution of QuickDraw 3D routines.
typedef void (*TQ3WarningMethod) (
TQ3Warning firstWarning,
TQ3Warning lastWarning,
long reference);
Your TQ3WarningMethod function is called whenever a QuickDraw 3D routine generates a warning during its execution that QuickDraw 3D cannot handle internally. Your warning-handling function should handle the warning conditions indicated by the firstWarning and lastWarning parameters. Your function must not call any QuickDraw 3D routines. The reference parameter contains the long integer that you passed to Q3Warning_Register when you registered your warning handler. You can, for example, use that long integer to point to any data required by your warning handler.
You can define a function to handle notices that occur during the execution of QuickDraw 3D routines.
typedef void (*TQ3NoticeMethod) (
TQ3Notice firstNotice,
TQ3Notice lastNotice,
long reference);
Your TQ3NoticeMethod function is called whenever a QuickDraw 3D routine generates a notice during its execution that QuickDraw 3D cannot handle internally. Your notice-handling function should handle the notice conditions indicated by the firstNotice and lastNotice parameters. Your function must not call any QuickDraw 3D routines. The reference parameter contains the long integer that you passed to Q3Notice_Register when you registered your notice handler. You can, for example, use that long integer to point to any data required by your notice handler.